using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Surface
{
    /// <summary>
    /// <para>Interpolate Shape</para>
    /// <para>Creates 3D features by interpolating z-values from a surface.</para>
    /// <para>通过插值曲面的 z 值来创建 3D 要素。</para>
    /// </summary>    
    [DisplayName("Interpolate Shape")]
    public class InterpolateShape : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public InterpolateShape()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_surface">
        /// <para>Input Surface</para>
        /// <para>The surface to use for interpolating z-values.</para>
        /// <para>用于插值 z 值的曲面。</para>
        /// </param>
        /// <param name="_in_feature_class">
        /// <para>Input Features</para>
        /// <para>The input features to process.</para>
        /// <para>要处理的输入要素。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The feature class that will be produced.</para>
        /// <para>将生成的要素类。</para>
        /// </param>
        public InterpolateShape(object _in_surface, object _in_feature_class, object _out_feature_class)
        {
            this._in_surface = _in_surface;
            this._in_feature_class = _in_feature_class;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Interpolate Shape";

        public override string CallName => "sa.InterpolateShape";

        public override List<string> AcceptEnvironments => ["XYResolution", "XYTolerance", "ZResolution", "ZTolerance", "autoCommit", "configKeyword", "extent", "geographicTransformations", "outputCoordinateSystem", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_surface, _in_feature_class, _out_feature_class, _sample_distance, _z_factor, _method.GetGPValue(), _vertices_only.GetGPValue(), _pyramid_level_resolution, _preserve_features.GetGPValue()];

        /// <summary>
        /// <para>Input Surface</para>
        /// <para>The surface to use for interpolating z-values.</para>
        /// <para>用于插值 z 值的曲面。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Surface")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_surface { get; set; }


        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input features to process.</para>
        /// <para>要处理的输入要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_feature_class { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The feature class that will be produced.</para>
        /// <para>将生成的要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Sampling Distance</para>
        /// <para>The spacing at which z-values will be interpolated. By default, this is a raster dataset's cell size or a triangulated surface's natural densification.</para>
        /// <para>插值 z 值的间距。默认情况下，这是栅格数据集的像元大小或三角化表面的自然致密化。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Sampling Distance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _sample_distance { get; set; } = null;


        /// <summary>
        /// <para>Z Factor</para>
        /// <para>The factor by which z-values will be multiplied. This is typically used to convert z linear units to match x,y linear units. The default is 1, which leaves elevation values unchanged. This parameter is not available if the spatial reference of the input surface has a z datum with a specified linear unit.</para>
        /// <para>z 值将乘以的因子。这通常用于转换 z 线性单位以匹配 x，y 线性单位。默认值为 1，使高程值保持不变。如果输入曲面的空间参考具有具有指定线性单位的 z 基准面，则此参数不可用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z Factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _z_factor { get; set; } = 1;


        /// <summary>
        /// <para>Method</para>
        /// <para><xdoc>
        ///   <para>Interpolation method used to determine elevation values for the output features. The available options depend on the surface type being used.</para>
        ///   <bulletList>
        ///     <bullet_item>Bilinear—Determines the value of the query point using bilinear interpolation. This is the default when the input is a raster surface.</bullet_item><para/>
        ///     <bullet_item>Nearest Neighbor—Determines the value of the query point using nearest neighbor interpolation. When this method is used, surface values will only be interpolated for the input feature's vertices. This option is only available for a raster surface.</bullet_item><para/>
        ///     <bullet_item>Linear— Default interpolation method for TIN, terrain, and LAS dataset. It obtains elevation from the plane defined by the triangle that contains the XY location of a query point.</bullet_item><para/>
        ///     <bullet_item>Natural Neighbors— Obtains elevation by applying area-based weights to the natural neighbors of a query point.</bullet_item><para/>
        ///     <bullet_item>Conflate Minimum Z— Obtains elevation from the smallest z-value found among the natural neighbors of a query point.</bullet_item><para/>
        ///     <bullet_item>Conflate Maximum Z— Obtains elevation from the largest z-value found among the natural neighbors of a query point.</bullet_item><para/>
        ///     <bullet_item>Conflate Nearest Z— Obtains elevation from the nearest value among the natural neighbors of a query point.</bullet_item><para/>
        ///     <bullet_item>Conflate Z Closest To Mean— Obtains elevation from the z-value that is closest to the average of all the natural neighbors of a query point.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于确定输出要素的高程值的插值方法。可用选项取决于所使用的曲面类型。</para>
        ///   <bulletList>
        ///     <bullet_item>双线性 （Bilinear） - 使用双线性插值确定查询点的值。当输入为栅格表面时，这是默认值。</bullet_item><para/>
        ///     <bullet_item>最近邻 （Nearest Neighbor） - 使用最近邻插值确定查询点的值。使用此方法时，将仅对输入要素的折点插值表面值。此选项仅适用于栅格表面。</bullet_item><para/>
        ///     <bullet_item>线性— TIN、terrain 和 LAS 数据集的默认插值方法。它从包含查询点的 XY 位置的三角形定义的平面获取高程。</bullet_item><para/>
        ///     <bullet_item>自然邻居 - 通过将基于区域的权重应用于查询点的自然邻居来获取高程。</bullet_item><para/>
        ///     <bullet_item>混淆最小 Z- 从查询点的自然邻居中找到的最小 z 值获取高程。</bullet_item><para/>
        ///     <bullet_item>混淆最大 Z - 从查询点的自然邻居中找到的最大 z 值获取高程。</bullet_item><para/>
        ///     <bullet_item>Conflate Nearest Z - 从查询点的自然邻居中的最近值获取高程。</bullet_item><para/>
        ///     <bullet_item>混淆 Z 最接近均值 - 从最接近查询点所有自然邻居的平均值的 z 值获取高程。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _method_value _method { get; set; } = _method_value._LINEAR;

        public enum _method_value
        {
            /// <summary>
            /// <para>Linear</para>
            /// <para>Linear— Default interpolation method for TIN, terrain, and LAS dataset. It obtains elevation from the plane defined by the triangle that contains the XY location of a query point.</para>
            /// <para>线性— TIN、terrain 和 LAS 数据集的默认插值方法。它从包含查询点的 XY 位置的三角形定义的平面获取高程。</para>
            /// </summary>
            [Description("Linear")]
            [GPEnumValue("LINEAR")]
            _LINEAR,

            /// <summary>
            /// <para>Natural Neighbors</para>
            /// <para>Natural Neighbors— Obtains elevation by applying area-based weights to the natural neighbors of a query point.</para>
            /// <para>自然邻居 - 通过将基于区域的权重应用于查询点的自然邻居来获取高程。</para>
            /// </summary>
            [Description("Natural Neighbors")]
            [GPEnumValue("NATURAL_NEIGHBORS")]
            _NATURAL_NEIGHBORS,

            /// <summary>
            /// <para>Conflate Minimum Z</para>
            /// <para>Conflate Minimum Z— Obtains elevation from the smallest z-value found among the natural neighbors of a query point.</para>
            /// <para>混淆最小 Z- 从查询点的自然邻居中找到的最小 z 值获取高程。</para>
            /// </summary>
            [Description("Conflate Minimum Z")]
            [GPEnumValue("CONFLATE_ZMIN")]
            _CONFLATE_ZMIN,

            /// <summary>
            /// <para>Conflate Maximum Z</para>
            /// <para>Conflate Maximum Z— Obtains elevation from the largest z-value found among the natural neighbors of a query point.</para>
            /// <para>混淆最大 Z - 从查询点的自然邻居中找到的最大 z 值获取高程。</para>
            /// </summary>
            [Description("Conflate Maximum Z")]
            [GPEnumValue("CONFLATE_ZMAX")]
            _CONFLATE_ZMAX,

            /// <summary>
            /// <para>Conflate Nearest Z</para>
            /// <para>Conflate Nearest Z— Obtains elevation from the nearest value among the natural neighbors of a query point.</para>
            /// <para>Conflate Nearest Z - 从查询点的自然邻居中的最近值获取高程。</para>
            /// </summary>
            [Description("Conflate Nearest Z")]
            [GPEnumValue("CONFLATE_NEAREST")]
            _CONFLATE_NEAREST,

            /// <summary>
            /// <para>Conflate Z Closest To Mean</para>
            /// <para>Conflate Z Closest To Mean— Obtains elevation from the z-value that is closest to the average of all the natural neighbors of a query point.</para>
            /// <para>混淆 Z 最接近均值 - 从最接近查询点所有自然邻居的平均值的 z 值获取高程。</para>
            /// </summary>
            [Description("Conflate Z Closest To Mean")]
            [GPEnumValue("CONFLATE_CLOSEST_TO_MEAN")]
            _CONFLATE_CLOSEST_TO_MEAN,

            /// <summary>
            /// <para>Bilinear</para>
            /// <para>Bilinear—Determines the value of the query point using bilinear interpolation. This is the default when the input is a raster surface.</para>
            /// <para>双线性 （Bilinear） - 使用双线性插值确定查询点的值。当输入为栅格表面时，这是默认值。</para>
            /// </summary>
            [Description("Bilinear")]
            [GPEnumValue("BILINEAR")]
            _BILINEAR,

            /// <summary>
            /// <para>Nearest Neighbor</para>
            /// <para>Nearest Neighbor—Determines the value of the query point using nearest neighbor interpolation. When this method is used, surface values will only be interpolated for the input feature's vertices. This option is only available for a raster surface.</para>
            /// <para>最近邻 （Nearest Neighbor） - 使用最近邻插值确定查询点的值。使用此方法时，将仅对输入要素的折点插值表面值。此选项仅适用于栅格表面。</para>
            /// </summary>
            [Description("Nearest Neighbor")]
            [GPEnumValue("NEAREST")]
            _NEAREST,

        }

        /// <summary>
        /// <para>Interpolate Vertices Only</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the interpolation will only occur along the vertices of an input feature, thereby ignoring the sample distance option. When the input surface is a raster and nearest neighbor interpolation method is selected, the z-values can only be interpolated at the feature vertices.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Interpolates along the vertices.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Interpolates using the sampling distance. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定插值是否仅沿输入要素的折点进行，从而忽略采样距离选项。当输入表面为栅格且选择最近邻插值方法时，只能在要素折点处插值 z 值。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 沿折点插值。</bullet_item><para/>
        ///     <bullet_item>未选中 （Unchecked） - 使用采样距离进行插值。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Interpolate Vertices Only")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _vertices_only_value _vertices_only { get; set; } = _vertices_only_value._false;

        public enum _vertices_only_value
        {
            /// <summary>
            /// <para>VERTICES_ONLY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("VERTICES_ONLY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DENSIFY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DENSIFY")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Pyramid Level Resolution</para>
        /// <para>The z-tolerance or window-size resolution of the terrain pyramid level that will be used. The default is 0, or full resolution.</para>
        /// <para>将使用的地形金字塔级别的 z 容差或窗口大小分辨率。默认值为 0，即全分辨率。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Pyramid Level Resolution")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _pyramid_level_resolution { get; set; } = 0;


        /// <summary>
        /// <para>Preserve features partially outside surface</para>
        /// <para><xdoc>
        ///   <para>Specifies whether features with one or more vertices that fall outside the raster's data area will be retained in the output. This parameter is only available when the input surface is a raster and the nearest neighbor interpolation method is used.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Each vertex that falls outside the raster surface will have its z-value derived from the trend of z-values calculated for the vertices within the raster surface.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Features with at least one vertex that falls outside the raster surface will be skipped in the output. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否在输出中保留具有一个或多个位于栅格数据区域之外的折点的要素。仅当输入表面为栅格并使用最近邻插值方法时，此参数才可用。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 位于栅格表面外的每个折点的 z 值将派生自为栅格表面内的折点计算的 z 值趋势。</bullet_item><para/>
        ///     <bullet_item>未选中 - 在输出中将跳过至少一个折点位于栅格表面之外的要素。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Preserve features partially outside surface")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _preserve_features_value _preserve_features { get; set; } = _preserve_features_value._false;

        public enum _preserve_features_value
        {
            /// <summary>
            /// <para>PRESERVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PRESERVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>EXCLUDE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("EXCLUDE")]
            [GPEnumValue("false")]
            _false,

        }

        public InterpolateShape SetEnv(object XYResolution = null, object XYTolerance = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(XYResolution: XYResolution, XYTolerance: XYTolerance, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}